package com.serkol.ams.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.serkol.ams.bean.MyPageOld;
import com.serkol.ams.entity.Coupon;
import com.serkol.ams.mapper.CouponMapper;
import com.serkol.ams.service.CouponService;
import org.springframework.stereotype.Service;

/**
* @author pingan
* @description 针对表【coupon】的数据库操作Service实现
* @createDate 2022-10-24 22:11:30
*/
@Service
public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon>
    implements CouponService{

    @Override
    public MyPageOld findByPageList(int pageSize, int current) {
        QueryWrapper<Coupon> queryWrapper=new QueryWrapper<>();
      //  queryWrapper.select(SqlFeildModal.getGoodsBackCloudFeild());
        //    queryWrapper.lambda().eq(Goods::getCloudType,1);
        queryWrapper.orderByDesc("ID");
        Page<Coupon> page=new Page<>(current,pageSize);
        Page<Coupon> mapPage = this.baseMapper.selectPage(page, queryWrapper);
        return MyPageOld.parsePage(mapPage);
    }
}




